package org.bambrikii.kbManager.feeds.dao;

import org.bambrikii.kbManager.feeds.model.FeedSite;
import org.bambrikii.site.base.core.dao.DAOBase;
import org.bambrikii.site.base.persistence.PersistenceConnector;
import org.hibernate.Criteria;
import org.hibernate.criterion.Expression;

public class FeedSiteDAO extends DAOBase<FeedSite> implements IFeedSiteDAO {

	public FeedSiteDAO(PersistenceConnector connector) {
		super(connector);
	}

	/* (non-Javadoc)
	 * @see org.bambrikii.kbManager.feeds.dao.IFeedSiteDAO#getByName(java.lang.String)
	 */
	@Override
	public FeedSite getByName(String name) {
		Criteria crit = getCriteria().add(Expression.eq("name", name));
		return (FeedSite) crit.uniqueResult();
	}
}
